<#include "common/main.html">
<#macro bodyId>common-edit</#macro>
<#macro content>

<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main ty-common-page">
    <h1 class="page-header">红包活动详情
        <div class="btns">
            <a class="btn btn-primary" href="/awardProduct/list">返回红包活动列表</a>
        </div>
    </h1>

    <form class="form-horizontal ac-form" role="form">
    
        <div class="form-group">
            <label class="col-sm-2 control-label required">红包产品名称：</label>
            <div class="col-sm-3">
                <input class="form-control ac-form-item" name="name" value="${awardProduct.name}" required/>
            </div>
        </div>

        <div class="form-group">
        
            <input type="hidden" class="form-control ac-form-item" name="id" value="${awardProduct.id}" readonly required/>
            
            <label class="col-sm-2 control-label required">金额(单位:分)：</label>
            <div class="col-sm-3">
                <input class="form-control ac-form-item" name="fee" value="${awardProduct.fee}" required/>
            </div>
            
            <label class="col-sm-2 control-label required">有效数量：</label>
            <div class="col-sm-3">
                <input class="form-control ac-form-item" name="validCount" value="${awardProduct.validCount}" required/>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label required">比率上限(%)：</label>
            <div class="col-sm-3">
                <input class="form-control ac-form-item" name="upperLimitRate" value="${awardProduct.upperLimitRate}" required/>
            </div>
            
            <label class="col-sm-2 control-label required">比率下限(%)：</label>
            <div class="col-sm-3">
                <input class="form-control ac-form-item" name="lowerLimitRate" value="${awardProduct.lowerLimitRate}" required/>
            </div>
        </div>
        
        <div class="form-group">
            <label class="col-sm-2 control-label required">点赞人数：</label>
            <div class="col-sm-3">
                <input class="form-control ac-form-item" name="likeCount" value="${awardProduct.likeCount}" placeholder="" required/>
            </div>
            
            <label class="col-sm-2 control-label required">状态：</label>
            <div class="col-sm-3">
               <select class="form-control ac-form-item" name="status" required>
                   <option value="1" <#if awardProduct.status=='1'>selected="true"</#if>>启用</option>
                   <!--<option value="0" <#if awardProduct.status=='0'>selected="true"</#if>>禁用</option>-->
               </select>
            </div>
        </div>
        
<!--         <div class="form-group"> -->
<!--             <label class="col-sm-2 control-label">备注：</label> -->
<!--             <div class="col-sm-8"> -->
<!--                 <textarea class="form-control ac-form-item" placeholder="" rows="6" name="remark">${awardProduct.remark}</textarea> -->
<!--             </div> -->
<!--         </div> -->

        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-8">
                <button type="submit" class="btn btn-success ">保存</button>
            </div>
        </div>
    </form>

</div>

<script>
    var config = {
    	    save: '/awardProduct/createOrUpdate',
    	    successRedirectApi:'${rc.contextPath}/awardProduct/list'
    }
</script>

</#macro>

